import request from '@/utils/request';
import {AxiosPromise} from 'axios';

/**
 * 查询测试关联列表
 * @param query
 * @returns {*}
 */

export const listExample3 = (query?: Example3VO): AxiosPromise<Example3VO[]> => {
  return request({
    url: '/demo/example3/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询测试关联详细
 * @param id
 */
export const getExample3 = (id: number): AxiosPromise<Example3VO> => {
  return request({
    url: '/demo/example3/' + id,
    method: 'get'
  });
};

/**
 * 新增测试关联
 * @param data
 */
export const addExample3 = (data: Example3VO) => {
  return request({
    url: '/demo/example3',
    method: 'post',
    data: data
  });
};

/**
 * 修改测试关联
 * @param data
 */
export const updateExample3 = (data: Example3VO) => {
  return request({
    url: '/demo/example3',
    method: 'put',
    data: data
  });
};

/**
 * 删除测试关联
 * @param id
 */
export const delExample3 = (id: number | Array<number>) => {
  return request({
    url: '/demo/example3/' + id,
    method: 'delete'
  });
};

export interface Example3VO extends BaseEntity {
  id?: number;
  /**
   * 名称
   */
  name?: string;

  /**
   * 状态
   */
  status?: string;

  /**
   * 备注
   */
  remark?: string;

}
